﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #f0f2f5;
}

.navbar {
    background-color: #ffffff;
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1877f2;
}

.nav-menu {
    display: flex;
    gap: 1.5rem;
}

.nav-item {
    text-decoration: none;
    color: #65676b;
    font-weight: 500;
}

.container {
    max-width: 1200px;
    margin: 80px auto 0;
    padding: 20px;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
}

.sidebar {
    position: sticky;
    top: 100px;
}

.profile-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 10px;
}

.content {
    background: white;
    border-radius: 8px;
    padding: 20px;
}

.post-form {
    margin-bottom: 20px;
}

    .post-form textarea {
        width: 100%;
        height: 100px;
        padding: 10px;
        border: 1px solid #ddd;
        border-radius: 8px;
        resize: none;
        margin-bottom: 10px;
    }

.post-btn {
    background: #1877f2;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
}

.post {
    border-bottom: 1px solid #ddd;
    padding: 20px 0;
}

.post-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

.post-info h4 {
    margin-bottom: 4px;
}

.post-time {
    color: #65676b;
    font-size: 0.9rem;
}

.post-content {
    margin-bottom: 15px;
}

.post-actions {
    display: flex;
    gap: 15px;
}

.action-btn {
    background: none;
    border: none;
    color: #65676b;
    cursor: pointer;
    font-size: 0.9rem;
}

    .action-btn:hover {
        color: #1877f2;
    }

@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }
}

/* 添加图片上传相关样式 */
.post-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.upload-wrapper {
    position: relative;
}

.file-input {
    display: none;
}

.upload-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 15px;
    background: #f0f2f5;
    border-radius: 6px;
    cursor: pointer;
    color: #65676b;
}

    .upload-btn:hover {
        background: #e4e6eb;
    }

.image-preview {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

    .image-preview img {
        width: 100px;
        height: 100px;
        object-fit: cover;
        border-radius: 8px;
    }

/* 评论区样式 */
.comments-section {
    margin-top: 15px;
    border-top: 1px solid #ddd;
    padding-top: 15px;
}

    .comments-section.hidden {
        display: none;
    }

.comment-form {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.comment-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
}

.comment-submit {
    background: #1877f2;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
}

.comment {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.comment-content {
    background: #f0f2f5;
    padding: 8px 12px;
    border-radius: 12px;
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.comment-author {
    font-weight: 500;
}

.comment-time {
    color: #65676b;
    font-size: 0.8rem;
}

/* 添加图标样式 */
.action-btn i {
    margin-right: 4px;
}

.post-images {
    margin: 10px 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

    .post-images img {
        width: 100%;
        border-radius: 8px;
        object-fit: cover;
    }

/* 加载动画样式 */
.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

    .loading-spinner.hidden {
        display: none;
    }

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #1877f2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* 通知样式 */
.notification-wrapper {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.7rem;
}

.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 300px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-top: 10px;
    z-index: 1000;
}

    .notification-dropdown.hidden {
        display: none;
    }

.notification-header {
    padding: 15px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mark-all-read {
    background: none;
    border: none;
    color: #1877f2;
    cursor: pointer;
}

.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f2f5;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

    .notification-item:hover {
        background: #f0f2f5;
    }

    .notification-item.unread {
        background: #e7f3ff;
    }

/* 无限滚动加载指示器 */
.infinite-scroll-loader {
    text-align: center;
    padding: 20px;
    display: none;
}

    .infinite-scroll-loader.active {
        display: block;
    }

/* 认证页面样式 */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f0f2f5;
}

.auth-box {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

    .auth-box h2 {
        text-align: center;
        margin-bottom: 1.5rem;
        color: #1877f2;
    }

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

    .form-group label {
        color: #65676b;
        font-size: 0.9rem;
    }

    .form-group input {
        padding: 0.8rem;
        border: 1px solid #ddd;
        border-radius: 6px;
        font-size: 1rem;
    }

.auth-btn {
    background: #1877f2;
    color: white;
    border: none;
    padding: 0.8rem;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 1rem;
}

    .auth-btn:hover {
        background: #166fe5;
    }

.auth-link {
    text-align: center;
    margin-top: 1rem;
    color: #65676b;
}

    .auth-link a {
        color: #1877f2;
        text-decoration: none;
    }

        .auth-link a:hover {
            text-decoration: underline;
        }
